Render web-components reference in .md exports, and add check-md-exports audit script - #603
Merged
Merged
Conversation
Contributor
Devon-White
self-requested a review
August 19, 2026 14:13
Devon-White
approved these changes
Aug 19, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Fixes
fern/products/browser-sdk/pages/v4/web-components/*.md→.mdx(27 files) and updatev4.ymlnav paths. These pages use<ParamField>/<CardGroup>, which Fern's.md-export path only compiles in.mdxfiles — every page in this section was exporting raw JSX to AI consumers while rendering fine as HTML. Verified on the preview: the exports now render every term properly.<Accordion>blocks in 5 v4 guides (house-style normalization perdocumentation-style.md; note the authentication guide's export corruption turned out to be a separate Fern exporter bug — fence imbalance in<EndpointRequestSnippet>output — reported upstream, not fixable from our MDX).
entity with a period insw-audio-level's methods table.New tooling:
scripts/check-md-exports.js(yarn check-md-exports): audits the llms.txt tree + all.mdexports for structural breakage. Tiered checks (error/warn/info),--cross-checkmode verifying ParamField terms from sources against deployed exports (with--source-ref origin/mainto read sources from the ref the site was built from, eliminating branch-drift noise),--base-urlfor previews, markdown/JSON reports, CI-ready exit codes. Zero dependencies, mirrorscheck-links.jsconventions.scripts/check-md-exports.test.js(yarn test:scripts, 18 fixture tests onnode:test): locks in the detection heuristics — the .md exports strip defined terms — llms.txt corpus is structurally broken #525 regression shape must trip, the legitimate older page styles must not, and the cross-check URL-mapping rules are pinned.scripts/README.md: documents all repo scripts, with a usage guide for the new audit.Verification:
fern check✓;fern docs md check✓ (2,806 MDX files valid on the rebased base);yarn test:scripts18/18 ✓--base-url <preview>/docs --product browser-sdk, 664 pages): 34 → 2 errors; both remaining are the upstream Fern snippet-fence bug--source-ref origin/main --product swml: 1,469 ParamField terms across 74 sources, zero missing from deployed exports (the 3 findings from the working-tree run were confirmed as branch drift, which this mode eliminates)Type of Change
Related Issues
Closes #525.
Testing
Checklist
Additional Notes